Fix Linux desktop Codex CLI detection at startup#1100
Fix Linux desktop Codex CLI detection at startup#1100Ryan-D-Gast wants to merge 1 commit intopingdotgg:mainfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required. |
|
I independently hit the same issue on Ubuntu 22.04 with the AppImage (v0.0.11) and arrived at the same fix. Tested locally with One note: since #972 landed, the desktop side was refactored from |
Might need to rebase and refactor then. Thanks for letting me know! |
You're welcome! If you need any help, let me know! I really want this fix to land, so that I can normally use the app on Linux |
4bbf969 to
5d7d29b
Compare
5d7d29b to
b2c097d
Compare
|
Rebased onto main and simplified the implementation:
All typechecks and tests pass. |
Hello, when running the
.AppImageon Linux and creating the corresponding.desktopapplication, t3code was unable to find thecodexCLI even though it was correctly available in my PATH (set in both.bashrcand.zshrc).At first I assumed this was something specific to my system, but after digging into it I determined the issue was caused by how PATH hydration was handled in the t3code startup sequence. This PR fixes that
Fixes #234
Fixes #367
Fixes #269
Fixes #301
Also related to #226
What Changed
codexthe same way terminal launches do.Why
When launching from a Linux desktop entry, the app could report that the Codex CLI was missing or not executable even though
codexworked fine in the terminal. This happened for two reasons:Note
Fix Codex CLI detection on Linux by extending PATH hydration to Linux desktop startup
resolveLoginShellutility inpackages/shared/src/shell.tsthat returns the user's shell or a platform default (/bin/zshon macOS,/bin/bashon Linux), returningundefinedon unsupported platforms.fixPathinapps/server/src/os-jank.tsandsyncShellEnvironmentinapps/desktop/src/syncShellEnvironment.tsto useresolveLoginShellinstead of a macOS-only guard, enabling PATH andSSH_AUTH_SOCKhydration on Linux.PathHydrationLivelayer inapps/server/src/main.ts, running it earlier in the dependency graph before other service layers initialize.Macroscope summarized b2c097d.